make json parser more robust for unknown properties. #1341#1342
Open
Lokowandtg wants to merge 5 commits intocloudfoundry:mainfrom
Open
make json parser more robust for unknown properties. #1341#1342Lokowandtg wants to merge 5 commits intocloudfoundry:mainfrom
Lokowandtg wants to merge 5 commits intocloudfoundry:mainfrom
Conversation
Allows to run a cf java client against a cf instance of a later version.
Contributor
|
If we ignore all the JSON parsing code, this specific fix is covered by #1340 I think, could you please confirm this? |
Contributor
Author
|
#1340 fixes the missing features we currently face because cf-java-client is behind. This change is improving error handling, making it configurable. This allows future incompatibilities to be ignored without touching the code. So both changes should be merged. |
Contributor
|
@Lokowandtg have you seen my comments in #1341 ? (direct link) |
Contributor
Author
|
Hi Daniel,
yes I have seen your comment and was a bit frustrated that I wasted time to implement the ~400 lines. 😊
The topic is not so pressing since I have a working test environment where I can control the version to use and when to update.
I will come up with a simpler switch / env variable for the integration tests when I find the time. By default, the integration tests should fail when there is a change. When the variable is set, they should continue working on best effort.
Thanks, Georg
From: Daniel Garnier-Moiroux ***@***.***>
Sent: Wednesday, 29 April 2026 14:40
To: cloudfoundry/cf-java-client ***@***.***>
Cc: Lokowandt, Georg ***@***.***>; Mention ***@***.***>
Subject: Re: [cloudfoundry/cf-java-client] make json parser more robust for unknown properties. #1341 (PR #1342)
[Image removed by sender.]Kehrlann left a comment (cloudfoundry/cf-java-client#1342)<#1342 (comment)>
@Lokowandtg<https://github.com/Lokowandtg> have you seen my comments in #1341<#1341> ? (direct link<#1341 (comment)>)
—
Reply to this email directly, view it on GitHub<#1342 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BKHIY6TPMMLZNE5XQYBNAQL4YHZZNAVCNFSM6AAAAACWWQATNOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DGNBTG4ZDKMBUGI>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1341 by improving the error handling when the JsonCodec detects a parsing error.
When there is a rule configured for the error at hand, the offending element is deleted and parsing of the remaining message is retried. If there is no rule or the retry fails, the problem is written to the log and the normal error handling stays unchanged.
An example configuration is in the integration tests. A configuration to ignore all errors is also provided.